package core;

import java.io.BufferedWriter;
import java.io.IOException;
import java.io.PrintStream;
import java.io.PrintWriter;
//Universal logger class
public class Logger {
	public enum LEVEL {
		ERROR,WARN,DEBUG
	}
	
	private LEVEL LOG_LEVEL;
	BufferedWriter br = new BufferedWriter(new PrintWriter(System.out));
	private String NEW_LINE = "\n";
	
	private void debug(String s) {
		try {
			br.write(s+NEW_LINE);
		} catch (IOException e) {
			error(e.getMessage());
		}
	}

	private void enter(String s) {
		try {
			br.write(s+NEW_LINE);
		} catch (IOException e) {
			error(e.getMessage());
		}		
	}
	
	private void exit(String s) {
		try {
			br.write(s+NEW_LINE);
		} catch (IOException e) {
			error(e.getMessage());
		}		
	}
	
	private void warn(String s) {
		try {
			br.write(s+NEW_LINE);
		} catch (IOException e) {
			error(e.getMessage());
		}		
	}
	
	private void error(String s) {
		try {
			br.write(s+NEW_LINE);
		} catch (IOException e) {
			//error(e.getMessage());
		}		
	}
	
	
	private void setLogLevel(LEVEL l) {
		LOG_LEVEL = l;
	}
}
